package com.yanqu.road.server.timer.curio;

import com.yanqu.road.pb.cangbao.CurioProto;
import com.yanqu.road.server.manger.activity.curio.CurioMgr;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.utils.executor.GeneralTask;

public class CurioTask extends GeneralTask {

    @Override
    public void doRun() {


        if(CurioMgr.needAll){
            CurioMgr.uploadAllServerMaxScore();
            CurioProto.CrossCurioUploadMaxScoreMsg.Builder upload = CurioProto.CrossCurioUploadMaxScoreMsg.newBuilder();
            upload.setNeedAll(true);
            GamePlayerMgr.sendPacket(0, YanQuMessageUtils.buildMessage(Protocol.C_CURIO_MAX_SCORE_UPLOAD, upload));
        }
    }
}
